﻿using UnityEngine;
using System.Collections;

namespace Battle.View
{
    public class GuideTipPanel : MonoBehaviour
    {
        public GameObject optionalTarget;

        public void ShowNormalAttackTip(BattleHeroItemGuide item)
        {
            var preTrans = item.transform.parent;
            item.transform.SetParent(transform);
            optionalTarget.GetComponent<GuideOptionTarget>().Show(GuideOptionTarget.OptionalTargetType.Right_Click, item.transform.localPosition, GuideOptionTarget.OptionalTargetEffectColor.Yellow);
            item.transform.SetParent(preTrans);
        }

        public void ShowUltimateAttackTip(BattleHeroItemGuide item)
        {
            var preTrans = item.transform.parent;
            item.transform.SetParent(transform);
            optionalTarget.GetComponent<GuideOptionTarget>().Show(GuideOptionTarget.OptionalTargetType.TopForwardDrag, item.transform.localPosition);
            item.transform.SetParent(preTrans);
        }

        public void Hide()
        {
            optionalTarget.GetComponent<GuideOptionTarget>().Hide();
        }
    }
}